<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@page import="java.util.*,com.gj.dao.*,com.gj.daoImp.*,com.gj.bean.*" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link href="../css/style.css" type="text/css" rel="stylesheet">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
 <%   
 ArrayList<CategoryBean> categorys1=new ArrayList<CategoryBean>();

 CategoryDao category=new CategoryDaoImp();
 categorys1=category.GetCategoryInfo();
	%>
	<div class="context">
		<h3 >添加联系人</h3>
	<div>
	<form action="../ContactServlet" method="post"  >
		<div class="top1">姓名:<input type="text" name="username" id="username" style="height: 25px; width: 250px" ></div>
		<div class="top1">电话:<input type="text" name="telephone" id="telephone" style="height: 25px; width: 250px;margin-left: 5px" ></div>
		<div class="top1">备注:<input type="text" name="mark" id="mark" style="height: 25px; width: 250px"></div>
		<div class="top1">地址:<input type="text" name="address" id="address" style="height: 25px; width: 250px;margin-left:5px"/></div>
		<input name=type type="hidden" value="add">
		<div id="select"  style="margin-left: -15px;margin-top: 5px">
		 分类：<select name="selectName" id="selectName" style="width: 260px;height: 30px" >
		 <%for(int i=0;i<categorys1.size();i++){%>
       	 <option value=<%=categorys1.get(i).getCategoryId() %>><%=categorys1.get(i).getCategoryName() %></option >
       	 <% } %>
      </select>
    </div>	
		<div style="margin-left:200px">
			 <input class="btn" type="submit" name="btnUpdate" id="btnUpdate" value="添加" onclick="onlyR()">
	
		</div>
	</form>
	</div>
	</div>
</body>
</html>